import request from '@/utils/request';

// 获取模板数据
export const getTplById = async <T>(params: { id: string }) =>
  request<any>('/pageManagement/template/detail', {
    params,
  });

// 获取页面数据
export const getPageById = async <T>(params: { id: string }) =>
  request<any>('/pageManagement/details', {
    params,
  });

// 保存或者修改
export const saveOrUpdate = async (data: any) =>
  request<any>('/pageManagement/saveOrUpdate', {
    method: 'POST',
    data,
  });
